package com.usesion.controller;

import com.usesion.config.DingTalkProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @desc: 测试
 * @author: XT
 */
@Controller
public class TestController {

    @Autowired
    private DingTalkProperties dingTalkProperties;

    @RequestMapping("test")
    public String test(Model model){
        model.addAttribute("name","usesion");
        model.addAttribute("appKey",dingTalkProperties.getAppKey());
        model.addAttribute("appSecret",dingTalkProperties.getAppSecret());
        return "test";
    }

    @RequestMapping("index")
    public String login(Model model){
        return "index";
    }
}
